<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      <input type="text" placeholder="输入城市/游玩/景点">
    </div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}<span class="iconfont">&#xe600;</span>
        <!-- {{this.doubleCity}}<span class="iconfont">&#xe600;</span> -->
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState, mapGetters } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city']),
    ...mapGetters(['doubleCity'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl';
  .header
    display: flex
    height: $headerHeight
    line-height: $headerHeight
    background: $bgColor
    color: #fff
    .header-left
      width: .64rem
      float: left
      text-align: center
    .header-input
      flex: 1
      margin-left: .1rem
      margin-right: .1rem
      margin-top: .14rem
      background-color: #ffffff
      border-radius: 6px
      height: .58rem
      line-height:.58rem
      text-indent: .2rem
      font-family: "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
      input
        line-height:.48rem
        font-family: "微软雅黑"
        vertical-align: baseline
      span
        color: #888888
    .header-right
      float: right
      min-width: 1.04rem
      padding: 0 .1rem
      text-align: center
      color: #ffffff
      span
        font-size: .24rem
        margin-left: .14rem
</style>
